package com.xdb.sqlparser.dialect.oracle.ast.clause;

import com.xdb.sqlparser.ast.statement.SQLWithSubqueryClause.Entry;
import com.xdb.sqlparser.dialect.oracle.ast.OracleSQLObject;
import com.xdb.sqlparser.dialect.oracle.visitor.OracleASTVisitor;
import com.xdb.sqlparser.visitor.SQLAstVisitor;

public class OracleWithSubqueryEntry extends Entry implements OracleSQLObject {

	private OracleSearchClause searchClause;
	private OracleCycleClause cycleClause;

	public OracleCycleClause getCycleClause() {
		return cycleClause;
	}

	public void setCycleClause(OracleCycleClause cycleClause) {
		this.cycleClause = cycleClause;
	}

	public OracleSearchClause getSearchClause() {
		return searchClause;
	}

	public void setSearchClause(OracleSearchClause searchClause) {
		this.searchClause = searchClause;
	}

	@Override
	public void accept0(OracleASTVisitor visitor) {
		if (visitor.visit(this)) {
			acceptChild(visitor, name);
			acceptChild(visitor, columns);
			acceptChild(visitor, subQuery);
			acceptChild(visitor, searchClause);
			acceptChild(visitor, cycleClause);
		}
		visitor.endVisit(this);
	}

	@Override
	protected void accept0(SQLAstVisitor visitor) {
		this.accept0((OracleASTVisitor) visitor);
	}

}
